{% extends 'base/base.html' %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card">
            <div class="card-header bg-danger text-white text-center">
                <h3 class="mb-0"><i class="fas fa-exclamation-triangle me-2"></i>确认删除</h3>
            </div>
            <div class="card-body text-center">
                <div class="mb-4">
                    <i class="fas fa-tag fa-4x text-muted mb-3"></i>
                    <h4>确定要删除标签 "{{ tag.name }}" 吗？</h4>
                </div>

                <div class="alert alert-warning">
                    <i class="fas fa-info-circle me-2"></i>
                    <strong>注意：</strong>删除标签不会删除关联的食物和记录，但会移除它们之间的关联关系。
                </div>

                <div class="row text-center mb-4">
                    <div class="col-6">
                        <div class="text-primary">{{ tag.food_count }}</div>
                        <small class="text-muted">关联食物</small>
                    </div>
                    <div class="col-6">
                        <div class="text-success">{{ tag.record_count }}</div>
                        <small class="text-muted">使用记录</small>
                    </div>
                </div>

                <form method="post">
                    {% csrf_token %}
                    <div class="d-grid gap-2 d-md-flex justify-content-md-center">
                        <a href="{% url 'main:tag_list' %}" class="btn btn-secondary me-md-2">取消</a>
                        <button type="submit" class="btn btn-danger">
                            <i class="fas fa-trash me-1"></i>确认删除
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}